#include <iostream>
#include <future>

int main() {
    // Create a future object to store the result of an asynchronous operation
    std::future<int> fut = std::async([]() {
        return 8; // Simulate a time-consuming operation that returns 8
    });

    // Retrieve the result from the future once the asynchronous operation is finished
    int result = fut.get();
    std::cout << "Result: " << result << std::endl;

    return 0;
}
